import { PropsWithChildren } from "react";
import { useLaunch, useDidShow, useDidHide } from "@tarojs/taro";
import "./app.scss";

function App({ children }: PropsWithChildren<any>) {
  // 应用的初始化 onLaunch
  useLaunch(() => {
    console.log("App launched.");
  });

  // 应用的显示 onShow
  useDidShow(() => {
    console.log("App show.");
  });

  // 应用的隐藏 onHide
  useDidHide(() => {
    console.log("App hide.");
  });

  // children 是将要会渲染的页面
  return children;
}

export default App;
